package com.personal.service;

import com.personal.dto.ImageHolder;
import com.personal.dto.ShopExecution;
import com.personal.entity.Shop;
import com.personal.exception.ShopOperationException;

import java.io.File;
import java.io.InputStream;

/**
 * @author 萌新
 * @version 1.0
 * @date 2021/4/14 10:22
 */


public interface ShopService {
    /**
     * 根据ShopCondition分页返回响应列表数据
     * @param shopCondition
     * @param pageIndex 前端页面 只有第几页 第几页 定义为pageIndex
     * @param pageSize 展示的行数
     * @return
     */
    public ShopExecution getShopList(Shop shopCondition,int pageIndex,int pageSize);


    /**
     * 通过店铺id获取店铺信息
     * @param shopId
     * @return
     */
    Shop getByShopId(long shopId);

    /**
     * 更新店铺信息，包括对图片的处理
     * @param shop
     * @param thumbnail
     * @return
     * @throws ShopOperationException
     */
    ShopExecution modifyShop(Shop shop, ImageHolder thumbnail) throws ShopOperationException;


    /**
     * 新增店铺
     * @param shop
     * @param thumbnail
     * @return
     */
    ShopExecution addShop(Shop shop, ImageHolder thumbnail);

}
